package com.hjj.springboot.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

@TableName("t_plan_detail")
@Data
public class PlanDetail {

    @TableId(type = IdType.AUTO)
    @ExcelProperty("编号")
    @ColumnWidth(20)
    private Integer id;     //编号

    @ExcelProperty("计划编号")
    @ColumnWidth(20)
    private Integer mid;    //计划编号

    @ExcelProperty("菜品名称")
    @ColumnWidth(20)
    private String name;

    @ExcelProperty("热量")
    @ColumnWidth(20)
    private Double calories;    //热量

    @ExcelIgnore
    private String image; //图片

    @ExcelProperty("记录时间")
    @ColumnWidth(20)
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    private Date time; // 最后登录日期

}
